home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 13
/
013.d81
/
dos #37
< prev
next >
Wrap
Text File
|
2022-08-26
|
2KB
|
95 lines
======================================
DOS & Don'ts -- Part 37
by James Gregory Weiler
======================================
Part E: Files
======================================
Section 1: seq & prg & usr files
These three file types are very
much alike, though they can be used to
store very different types of data.
Their similarity lies in the way they
are laid out on a disk. See map 6,
quite a ways below.
Each block of these files begins
with a two-byte track/block link to
the next block of the files, just like
the links we saw in the directory.
The other 254 bytes in each block
just contain the file data, whatever
that may be... we're really not
interested in what that data is right
now, but here's the kind of stuff you
might find in each kind of file.
SEQ - usually ASCII text.
USR - usually ASCII text.
PRG - usually a BASIC program.
PRG - often a machine code program.
PRG - sometimes ASCII text.
Now, before we wrap up with relative
files, let's look at all the steps DOS
could have to go through to read a
five-block program file.
a) Read BAM
b) Establish directory link (18,1).
c) Read directory (18,1).
d) Look for file name.
-- not found --
e) Establish directory link (18,4).
f) Read directory (18,4).
g) Look for file name.
-- found it --
h) Establish file link (21,6).
i) Read file block one (21,6).
j) Establish file link (21,9).
k) Read file block two (21,9).
l) Establish file link (21,12).
m) Read file block three (21,12).
n) Establish file link (21,15).
o) Read file block four (21,15).
p) Establish file link (21,18).
q) Read file block five (21,18).
r) End of file found. All done.
======================================
Map 6: Data block structure for all
file types: SEQ, USR, PRG & REL
--------------------------------------
byte contents
---- --------
0-1 File link: Track & block
number of next data block.
2-256 File data
=======< continued in Part 38 >=======